---
import '@styles/markdown.min.css'

export interface Props {
    isDraft: boolean,
}

const { isDraft } = Astro.props
---

<section class={ `markdown-wrapper ${ isDraft ? 'draft' : '' } ` }>
    <slot />
</section>

<style>
    .draft {
        filter: grayscale(1);
        opacity: 0.3;
        user-select: none;
        pointer-events: none;
    }
</style>

<script>
import { 
    createCodeLanguageTag, 
    // titleInsertEvent,
    createATagJump,
    // iamgeTagInsertEvent,
} from "@utils/domUtil"

window.addEventListener("DOMContentLoaded", function(){
    createCodeLanguageTag()
    // titleInsertEvent()
    createATagJump()
    // iamgeTagInsertEvent()
})
</script>